extends Node

var current_user : String
var user_data_folder := "user://userdata/"
var conf_path = user_data_folder + "conf.tres"

enum GAME_MODES {
	DEPLOYMENT,
	PLAY,
	PAUSED
}

var current_mode = GAME_MODES.DEPLOYMENT

func _ready():
	if ResourceLoader.exists(conf_path):
		var conf = ResourceLoader.load(conf_path)
		if conf is UserData:
			current_user = conf.user_name

func get_user_deck(user: String = current_user) -> Resource:
	return ResourceLoader.load(get_user_deck_file(user))

func get_user_deck_file(user: String = current_user):
	return user_data_folder + user + "/deck.tres"
